# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-scandir
pkgver=1.10.0
pkgrel=8
pkgdesc='A better directory iterator and faster os.walk().'
arch=('any')
url='https://github.com/benhoyt/scandir'
license=('BSD')
depends=('python')
makedepends=('python-setuptools')
source=("https://github.com/benhoyt/scandir/archive/v$pkgver.tar.gz")
sha512sums=('1641ee5060331fe35a5f97c26a14423cf94fe462cdf875746e29ce095d00b9fc34291efd50ee67f1613d19312a8ed737f29a5092a38afdb1dc817fadc52a508f')

build() {
  cd scandir-$pkgver
  python setup.py build
}

check() {
  cd scandir-$pkgver
  LC_CTYPE=en_US.UTF-8 python test/run_tests.py
}

package() {
  cd scandir-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
}

